﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace ProcDaemon.Configuration
{
    public class ProcessSection : ConfigurationElement
    {
        [ConfigurationProperty("path", IsRequired = true)]
        public string path
        {
            get
            {
                return (string)base["path"];
            }
            set
            {
                base["path"] = value;
            }
        }

        [ConfigurationProperty("arguments")]
        public string arguments
        {
            get
            {
                return (string)base["arguments"];
            }
            set
            {
                base["arguments"] = value;
            }
        }

        [ConfigurationProperty("autoStart")]
        public bool autoStart
        {
            get
            {
                return (bool)base["autoStart"];
            }
            set
            {
                base["autoStart"] = value;
            }
        }

        [ConfigurationProperty("cpuPercentageThreshold", DefaultValue = 90.0)]
        public double cpuPercentageThreshold
        {
            get
            {
                return (double)base["cpuPercentageThreshold"];
            }
            set
            {
                base["cpuPercentageThreshold"] = value;
            }
        }

        [ConfigurationProperty("mailSecondsThreshold", DefaultValue = 5)]
        public int mailSecondsThreshold
        {
            get
            {
                return (int)base["mailSecondsThreshold"];
            }
            set
            {
                base["mailSecondsThreshold"] = value;
            }
        }

        [ConfigurationProperty("restarSecondsThreshold", DefaultValue = 300)]
        public int restarSecondsThreshold
        {
            get
            {
                return (int)base["restarSecondsThreshold"];
            }
            set
            {
                base["restarSecondsThreshold"] = value;
            }
        }
    }
}
